<?php
/**
 * FormLoader
 * User: Petr Láslo
 * Date: 9.11.11
 * Time: 16:14
 * To change this template use File | Settings | File Templates.
 */
 
class Knihovna_Controller_Action_Helper_FormLoader extends Zend_Controller_Action_Helper_Abstract {
    public function loadForm($form)
    {
        $form = (string) $form;
        $formName = 'Knihovna_Form_'.ucfirst($form);
        $class = new $formName();
        return $class;
    }

    public function direct($form)
    {
        return $this->loadForm($form);
    }
}
